package cn.edu.ctgu.junitTest;


import org.junit.jupiter.api.Test;



import static org.junit.jupiter.api.Assertions.assertEquals;

public class CommissionTest {
    @Test
    void testCommission() {
        Commission commission = new Commission();

        String[][] strings = {{"21", "13", "11"}, {"22", "2", "32"}, {"-1个枪机售出"}};
        String money = commission.com(strings);
        assertEquals("522.0", money);
    }

    @Test
    void testCommission2() {
        Commission commission = new Commission();

        String[][] strings = new String[][]{{"3", "2", "3"}, {"-1个枪机售出"}};
        String money = commission.com(strings);
        assertEquals("27.0", money);
    }

    @Test
    void testCommission3() {
        Commission commission = new Commission();

        String[][] strings = new String[][]{{"70", "80", "90"}, {"-1个枪机售出"}};
        String money = commission.com(strings);
        assertEquals("1390.0", money);
    }
}